From: Andrew Cooper Date: Tue, 9 Oct 2018 12:48:57 +0000 (+0100) Subject: x86/mm: Simplify promote_l4_table()'s exit semantics X-Git-Tag: archive/raspbian/4.14.0+80-gd101b417b7-1+rpi1^2~63^2~1025 X-Git-Url: https://dgit.raspbian.org/%22http:/www.example.com/cgi/%22https://%22%22/%22http:/www.example.com/cgi/%22https:/%22%22?a=commitdiff_plain;h=704fa1532801bc02c4500462f0b913b3c137db4d;p=xen.git x86/mm: Simplify promote_l4_table()'s exit semantics promote_l4_table() is different from its lower level helpers, by having an extra return path out of the middle of the loop in the case of a failure. Break from the loop, which is consistent with the other helpers, and functionally equivalent. Signed-off-by: Andrew Cooper Reviewed-by: George Dunlap --- diff --git a/xen/arch/x86/mm.c b/xen/arch/x86/mm.c index c14c677a62..594f1bd290 100644 --- a/xen/arch/x86/mm.c +++ b/xen/arch/x86/mm.c @@ -1856,10 +1856,7 @@ static int promote_l4_table(struct page_info *page) } } if ( rc < 0 ) - { - unmap_domain_page(pl4e); - return rc; - } + break; pl4e[i] = adjust_guest_l4e(l4e, d); }